]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
dnd: Don't queue an idle handler if we already have one
authorFlorian Müllner <fmuellner@gnome.org>
Wed, 6 Nov 2013 17:22:47 +0000 (18:22 +0100)
committerFlorian Müllner <fmuellner@gnome.org>
Wed, 6 Nov 2013 17:36:42 +0000 (18:36 +0100)
Removing an existing source before scheduling a new one is not wrong,
but slightly less effective than doing nothing and relying on the
previously created source to do the job.

https://bugzilla.gnome.org/show_bug.cgi?id=711555

js/ui/dnd.js

index 8172ac51c3dc0cab5b866b90d662529b7d2284bc..042cd195e86dcfcbb0e51ff4e75ac9df2d4eab43 100644 (file)
@@ -391,7 +391,7 @@ const _Draggable = new Lang.Class({
 
     _queueUpdateDragHover: function() {
         if (this._updateHoverId)
-            GLib.source_remove(this._updateHoverId);
+            return;
 
         this._updateHoverId = GLib.idle_add(GLib.PRIORITY_DEFAULT,
                                             Lang.bind(this, this._updateDragHover));